package ejb;


import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;

import entities.Venta;

@Stateless
public class AdministradorVentasBean implements AdministradorVentas{

	@PersistenceContext
    private EntityManager entityManager;

	@Override
	public List<Venta> getVentas() {
		
		TypedQuery<Venta> q = entityManager.createQuery(
			    "from Venta", Venta.class);
		List<Venta> resultList = q.getResultList();
		
		
		
		return resultList;
		
		

	}

}
